Skip to content

Add Apache license headers to fix ATR concerns - #12613

Merged
gnodet merged 1 commit into
maven-4.0.xfrom
fix/atr-license-headers
Jul 29, 2026
Merged

Add Apache license headers to fix ATR concerns#12613
gnodet merged 1 commit into
maven-4.0.xfrom
fix/atr-license-headers

Conversation

@gnodet

@gnodet gnodet commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Add missing Apache License headers to files flagged by ATR (Apache Trusted Releases) during the rc-6 release review.

  • Java test files: MyMojoTest.java, App.java, AppTest.java — added standard ASF license header
  • Shell script: prepare.sh — added #-style license header after shebang
  • Config files: Jenkinsfile, .asf.yaml — added license headers
  • Service loader files: javax.annotation.processing.Processor, org.apache.maven.api.di.Inject — added #-comment license headers (valid per SPI spec)
  • Test XML files: 77 .pom, pom.xml, and maven-metadata.xml files in compat/maven-compat/src/test/resources/inheritance-repo/ and src/test/remote-repo/ — added XML comment license headers
  • Placeholder file: placeholder.txt — added plain text license header

Remaining ATR concerns (cannot be fixed):

  • Binary .jar files (~50 files in test resources) — cannot add text headers to binary files
  • Third-party license texts (EPL-1.0.txt, CDDL+GPLv2-with-classpath-exception.txt, etc.) — cannot add Apache header to third-party licenses
  • Bad.java — intentionally invalid Java file for MNG-5208 test
  • source.txt — test asserts exact "Hello World!" on first line

These remaining items are already excluded in the Maven Rat plugin configuration and are standard false positives.

Test plan

  • Verify mvn verify still passes (XML comment headers are ignored by Maven's POM parser)
  • Verify inheritance tests in compat/maven-compat still pass
  • Verify ATR re-scan shows fewer concerns

🤖 Generated with Claude Code

Add missing Apache License headers to files flagged by ATR:
- Java test files (MyMojoTest.java, App.java, AppTest.java)
- Shell script (prepare.sh)
- Config files (Jenkinsfile, .asf.yaml)
- Service loader files (Processor, di.Inject)
- Test pom/metadata XML files in inheritance-repo
- Test placeholder files

Binary .jar files and third-party license texts (EPL, CDDL, BSD)
remain without headers as they cannot be modified.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Mechanical addition of standard Apache License headers across 87 files to address ATR release-review concerns. All headers are correct, properly positioned, and use appropriate comment syntax per file type (/* */ for Java/Groovy, # for YAML/SPI/shell, <!-- --> for XML, plain text for .txt).

A few minor observations (all benign):

  1. Jenkinsfile — The #!groovy shebang was removed. Modern Jenkins Declarative Pipeline doesn't require it, so this is safe.
  2. NOTICE — URL changed from http to https — good modernization, though outside the stated scope.
  3. AppTest.java (test resource fixture) — Import statements were reordered. No functional impact.

All XML files correctly preserve <?xml?> declarations on line 1 with license headers placed after. Shell script preserves shebang. SPI service loader files use valid #-style comments per the ServiceLoader spec.

(Posting as COMMENT because GitHub does not allow self-approval — this would otherwise be an APPROVE.)

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of gnodet

@gnodet
gnodet merged commit 732927e into maven-4.0.x Jul 29, 2026
21 checks passed
@gnodet
gnodet deleted the fix/atr-license-headers branch July 29, 2026 15:41
@github-actions github-actions Bot added this to the 4.0.0-rc-7 milestone Jul 29, 2026
@github-actions

Copy link
Copy Markdown

@gnodet Please assign appropriate label to PR according to the type of change.

gnodet added a commit that referenced this pull request Jul 29, 2026
Add missing Apache License headers to files flagged by ATR:
- Java test files (MyMojoTest.java, App.java, AppTest.java)
- Shell script (prepare.sh)
- Config files (Jenkinsfile, .asf.yaml)
- Service loader files (Processor, di.Inject)
- Test pom/metadata XML files in inheritance-repo
- Test placeholder files

Binary .jar files and third-party license texts (EPL, CDDL, BSD)
remain without headers as they cannot be modified.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet modified the milestones: 4.0.0-rc-7, 4.0.0-rc-6 Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant